import { $get, $post, $put } from '@js/authRequest'

export async function addRequest (d) {
  const res = await $post('/api/mgt/expert', d)
  return res.data
}

export async function updateRequest (d) {
  const id = d.id
  delete d.id
  const res = await $put(`/api/mgt/expert/${id}`, d)
  return res
}

export async function getRequest (id) {
  const res = await $get(`/api/mgt/expert/${id}`)
  return res.data
}
